<?php
/**
 * User: fu
 * Date: 12-3-22
 * Time: 下午5:26
 */

$navcat = new Catalog(array('id_str' => 'id', 'pid_str' => 'parent_catalog','cur_id'=>13,
    'pid'=>13,
    'item_fn'=>function($item){
        return sprintf('<a href="editmanage.php?act=alt&amp;mid=%d">%s</a>'.
                       '<a href="editmanage.php?act=add&amp;mid=%d">建立子目录</a>'.
                       '<a href="editmanage.php?act=del&amp;mid=%d">删除</a>',
            $item['id'],$item['cat_name'],$item['id'],$item['id']);
    }));
echo $navcat->get($publish->select());